package io;

import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;

//缓冲字符流  内部维护8K长度的char数组
public class PWDemo {
    public static void main(String[] args) throws FileNotFoundException, UnsupportedEncodingException {
        //向文件中写入文本数据
        PrintWriter pw=new PrintWriter("pw.txt","UTF-8");
        pw.println("常常想念你的微笑");
        pw.println("爱能隔山海 山海皆可平");
        System.out.println("写出完毕");
        pw.close();

    }
}
